<?php
class TopMenuWidget extends Widget {

    /**
     * Initializes the widgets
     */
    public function init() {
        parent::init();
    }

    /**
     * Execute the widgets
     */
    public function run() {
        Yii::beginProfile(get_class($this));

        $menu = array(
            array('label' => Yii::app()->user->displayName, 'url' => ''),
            array('label' => Lang::t('menu.front.end'), 'url' => $this->url('site/index')),
            array('label' => Lang::t('menu.logout'), 'url' => $this->controller->logoutUrl),
        );

        $this->render('componentsViewPath._topMenuWidget', array(
            'menu' => $menu,
        ));

        Yii::endProfile(get_class($this));
    }

}//end class